/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.risk.control.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.bizz.common.core.util.DateUtils;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 机制运行评估记录
 *
 * @author pig
 * @date 2023-07-18 16:14:05
 */
@Data
@TableName("risk_operational_evaluation")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "机制运行评估记录")
public class RiskOperationalEvaluationEntity extends Model<RiskOperationalEvaluationEntity> {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 周
	*/
    @Schema(description="周")
    private Integer week;

	/**
	* 年
	*/
    @Schema(description="年")
    private Integer year;

	/**
	* 开始时间
	*/
    @Schema(description="开始时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

	/**
	* 结束时间
	*/
    @Schema(description="结束时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

	/**
	* 排查任务完成情况得分
	*/
    @Schema(description="排查任务完成情况得分")
    private Double riskTaskScore;

	/**
	* 隐患治理情况得分
	*/
    @Schema(description="隐患治理情况得分")
    private Double hidTaskScore;

	/**
	* 否决项
	*/
    @Schema(description="否决项")
    private Boolean negatedItem;

	/**
	* 总分
	*/
    @Schema(description="总分")
    private Double totalPoints;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;


	public String getStartTimeStr(){
		return DateUtils.limitDay(this.startTime);
	}

	public String getEndTimeStr(){
		return DateUtils.limitDay(this.endTime);
	}





}
